﻿/*
 * This software is the confidential and proprietary
 * information of NetBay
 * Such confidential information should not be disclosed
 * NetBay copyright(c) 2010
 */

using NetBay.Core.BusinessEntities.Enum;
using System.Runtime.Serialization;

namespace NetBay.Core.BusinessEntities
{
    /// <summary>
    /// Represents an ocr mask item (association of an index, an ocr area and an ocr type). Implements INotifyPropertyChanged to enable databinding.
    /// </summary>
    [DataContract]
    public class OcrMaskItem : ReturnObject//, INotifyPropertyChanged
    {
        /// <summary>
        /// Occurs when a property value changes.
        /// </summary>
        //public event PropertyChangedEventHandler PropertyChanged;

        [DataMember]
        public Index Index
        {
            get
            {
                return this.m_oIndex;
            }

            set
            {
                if (value != this.m_oIndex)
                {
                    this.m_oIndex = value;
                    //NotifyPropertyChanged("Index");
                }
            }
        } private Index m_oIndex;

        [DataMember]
        public OcrArea Area
        {
            get
            {
                return this.m_oArea;
            }

            set
            {
                if (value != this.m_oArea)
                {
                    this.m_oArea = value;
                    //NotifyPropertyChanged("Area");
                }
            }
        } private OcrArea m_oArea;

        [DataMember]
        public OcrType OcrType
        {
            get
            {
                return this.m_oOcrType;
            }

            set
            {
                if (value != this.m_oOcrType)
                {
                    this.m_oOcrType = value;
                    //NotifyPropertyChanged("OcrType");
                }
            }
        } private OcrType m_oOcrType;

        [DataMember]
        public string OcrValue
        {
            get
            {
                return m_sOcrValue;
            }

            set
            {
                m_sOcrValue = value;
            }
        } private string m_sOcrValue;

        /// <summary>
        /// Notifies the property changed.
        /// </summary>
        /// <param name="p_sPropertyName">Name of the property.</param>


        //private void NotifyPropertyChanged(String p_sPropertyName)
        //{
        //    if (PropertyChanged != null)
        //    {
        //        PropertyChanged(this, new PropertyChangedEventArgs(p_sPropertyName));
        //    }
        //}
    }

    //[DataContract]
    //public class OcrOutput : ReturnObject
    //{
    //    private Dictionary<long, long> l_dicOcrOutputIndexAndOccurency = new Dictionary<long, long>();
    //    private List<string> l_lstIndexValues = new List<string>();

    //    [DataMember]
    //    public Dictionary<long, long> DicOcrOutputIndexAndOccurency
    //    {
    //        get { return l_dicOcrOutputIndexAndOccurency; }
    //        set { l_dicOcrOutputIndexAndOccurency = value; }
    //    }

    //    [DataMember]
    //    public List<string> LstIndexValues
    //    {
    //        get { return l_lstIndexValues; }
    //        set { l_lstIndexValues = value; }
    //    }
    //}

    //[DataContract]
    //public class OcrInput : ReturnObject
    //{
    //    private Dictionary<string, List<long>> l_dicOcrInput = new Dictionary<string, List<long>>();
    //    [DataMember]
    //    public Dictionary<string, List<long>> DicOcrInput
    //    {
    //        get { return l_dicOcrInput; }
    //        set { l_dicOcrInput = value; }
    //    }
    //}
}
